import { get, post } from '../ajax'
import { getAjaxBaseUrl } from '../handler'

const baseUrl = getAjaxBaseUrl('/dataSourceConfiguration', '/energy')
export function queryDataSourceConfigsByPointId(pointId: number) {
  return get(
    `${baseUrl}/loadByEnergyUnitIdList`,
    {
      energyUnitId: pointId,
    },
  )
}

export function saveOrUpdateDataSourceConfig(data: any) {
  return post(`${baseUrl}/saveOrUpdate`, data)
}
